package com.db;

import java.sql.ResultSet;
import java.util.List;

import javax.management.Query;

import com.entity.People;

public class PeopleDao extends BaseDao<People>{

	public List<People> queryallpeople(){
		String sql="select * from jstltest";
		return super.queryall(sql);
	}
	
	@Override
	protected People getEntity(ResultSet rs) {
		People people =new People();
		try {
			people.setId(rs.getInt("id"));
			people.setName(rs.getString("name"));
			people.setSex(rs.getString("sex"));
			people.setTime(rs.getDate("time"));
		} catch (Exception e) {
			// TODO: handle exception
		}
		return people;
	}

}
